package com.minisoft.ydac;

import lombok.Getter;

/**
 * 客户标签字段定义
 */
@Getter
public enum WxbPushCustomerLabelEnum {

    CHANNEL_NAME("中介公司", "channelName"),
    VISIT_CHANNEL_NAME("来访渠道", "visitChannelName"),
    AGENT_NAME("报备人姓名", "agentName");

    private String labelName;
    private String field;

    WxbPushCustomerLabelEnum(String labelName, String field) {
        this.labelName = labelName;
        this.field = field;
    }

    public static WxbPushCustomerLabelEnum getByField(String field) {
        for (WxbPushCustomerLabelEnum customerLabelFiledEnum : WxbPushCustomerLabelEnum.values()) {
            if (customerLabelFiledEnum.field.equals(field)) {
                return customerLabelFiledEnum;
            }
        }
        return null;
    }
}
